package cn.com.taiji.pos.controller.Abandoned;


import cn.com.taiji.model.finals.SessionNames;
import cn.com.taiji.pos.entity.SystemAclUser;
import com.alibaba.fastjson.JSONObject;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.util.WebUtils;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

//@RestController
//@RequestMapping("/LockAndUnlock")
public class LockAndUnlockController {
    /**
     * ********
     *
     * @param request
     * @param response
     */
    @RequestMapping(value = "Lock", method = RequestMethod.POST)
    public String lock(Model model, HttpServletRequest request, HttpServletResponse response) {
        model.addAttribute("result", "fail");
        SystemAclUser user = (SystemAclUser) WebUtils.getSessionAttribute(request, SessionNames.LOGIN_USER);


        model.addAttribute("result", "success");
        model.addAttribute("message", "支付成功");
        return JSONObject.toJSONString(model);
    }

}
